﻿// ////////////////////////////////////////////////////////////////////////////
// 
// SWE Case Tool
// 
// Solution:	CaseTool
// Project:		4. MethodCocomo
// Filename:	IChanged.cs
// 
// File Created:	16:57 31.05.2013 
// Last Changed:	18:11 05.06.2013
// 
// ////////////////////////////////////////////////////////////////////////////

using System;

namespace SWE.CaseTool.Methods
{
	/// <summary>
	/// Callback eventhandler. Will be called from the child to notify the parent of changes at the child or
	/// at a child of a child.
	/// </summary>
	/// <param name="sender">The sender.</param>
	/// <param name="args">
	/// The <see cref="EventArgs" /> instance containing the event data.
	/// </param>
	public delegate void ChangedEventHandler(object sender, EventArgs args);

	/// <summary>
	/// IChanged interface for notifiing the parent of changes in it's child objects. E.G. a change in a
	/// subcontrol which modifies a parameter, a recalcutation of the whole project is needed. The child
	/// control then uses the Changed-Method of it's parent to tell him that something has changed.
	/// </summary>
	public interface IChanged
	{
		/// <summary>
		/// Gets or sets the changed event handler for notifiing the parent of changes in it's child objects.
		/// E.G. a change in a
		/// subcontrol which modifies a parameter, a recalcutation of the whole project is needed. The child
		/// control then uses the Changed-Method of it's parent to tell him that something has changed
		/// </summary>
		/// <value>
		/// The changed event handler.
		/// </value>
		ChangedEventHandler Changed { set; get; }
	}
}